@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  /**
   * Tailwind CSS theme
   * tailwind.config.ts expects the following color variables to be expressed as HSL values.
   * A different format will require also updating the theme in tailwind.config.ts.
  */
  :root {
    --background: 30 25% 98%;
    --foreground: 20 20% 15%;

    --card: 0 0% 100%;
    --card-foreground: 20 20% 15%;

    --popover: 0 0% 100%;
    --popover-foreground: 20 20% 15%;

    --primary: 24 95% 53%;
    --primary-foreground: 30 25% 98%;

    --secondary: 24 20% 95%;
    --secondary-foreground: 24 95% 53%;

    --muted: 30 15% 94%;
    --muted-foreground: 25 15% 45%;

    --accent: 16 85% 66%;
    --accent-foreground: 30 25% 98%;

    --destructive: 0 65% 51%;
    --destructive-foreground: 30 25% 98%;

    --border: 30 20% 90%;
    --input: 30 20% 94%;
    --ring: 24 95% 53%;

    --radius: 0.5rem;

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95.9%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 20 25% 6%;
    --foreground: 30 25% 95%;

    --card: 20 25% 8%;
    --card-foreground: 30 25% 95%;

    --popover: 20 25% 8%;
    --popover-foreground: 30 25% 95%;

    --primary: 24 95% 53%;
    --primary-foreground: 20 25% 6%;

    --secondary: 20 15% 15%;
    --secondary-foreground: 30 25% 95%;

    --muted: 20 15% 12%;
    --muted-foreground: 25 15% 65%;

    --accent: 16 85% 66%;
    --accent-foreground: 20 25% 6%;

    --destructive: 0 65% 51%;
    --destructive-foreground: 30 25% 95%;

    --border: 20 15% 18%;
    --input: 20 15% 18%;
    --ring: 24 95% 53%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-family:
      -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  }

  /* iOS-like scrolling */
  .smooth-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Hide scrollbar for webkit browsers */
  .hide-scrollbar::-webkit-scrollbar {
    display: none;
  }

  .hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Text clamp utility */
  .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Safe area for iOS devices */
  @supports (padding: max(0px)) {
    .safe-bottom {
      padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
  }
}
